package cn.com.hhrcw.enterprise.web;

import cn.com.hhrcw.enterprise.params.EnRegInfoParams;
import cn.com.hhrcw.enterprise.service.EnterpriseService;
import cn.com.hhrcw.service.IFileService;
import cn.com.hhrcw.service.IOpDeliveryHistoryService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 公司注册
 *
 * @author: JD
 * @create: 2020-11-06 14:45
 **/
@RestController
@RequestMapping("/en/reg")
@Slf4j
public class RegV2Controller {


    @Autowired
    EnterpriseService enterpriseService;


    @Autowired
    IFileService fileService;


    @Autowired
    IOpDeliveryHistoryService historyService;


    /**
     * 注册-添加公司信息
     *
     * @param entParams 请求参数
     * @return
     */
    @PostMapping(value = "/addComInfo2")
    @AutoLog(logType = 2, ty = "insert", value = "公司注册")
    @ApiOperation(value = "添加", notes = "添加")
    public Result<?> add(@RequestBody @Valid EnRegInfoParams entParams) {
        return this.enterpriseService.reg(entParams);

    }


}
